var Q = require('q');
var defer = Q.defer();
/*
* 获取初始promise
* @private
* */
function getInitialPromise() {
    return defer.promise;
}
/*
* 为promise 设置三种状态的回调函数
* */
getInitialPromise().then(function (success) {
    console.log(success);
},function (error) {
    console.error(error);
},function (progress) {
    console.log(progress);
});

defer.notify('in progress');
defer.resolve('resolve');
defer.reject('reject');

// var outputPromise = getInputPromise().then(function (fulfilled) {
//
// },function (rejected) {
//
// });